/* 订单相关API */
import request from '@/utils/request'

//获取列表数据
export function getDataInfo(data) {
	return request({
		url: '/plm/problem/getProblemList',
		method: 'post',
		headers: { repeatSubmit: false },
		data
	})
}
//获取款式开发顶部勾选数据
export function getTopCheckInfo(params) {
	return request({
		url: '/plm/view/styleCondition',
		method: 'get',
		headers: { repeatSubmit: false },
		params
	})
}
//获取当前登录用户的信息
export function getLoginNowUserInfo(params) {
	return request({
		url: '/plm/problem/getUserInfo',
		method: 'get',
		headers: { repeatSubmit: false },
		params
	})
}
// 修改问题状态
export function changeQStatus(data) {
	return request({
		url: '/plm/problem/updateProblemStatus',
		method: 'post',
		headers: { repeatSubmit: false },
		data
	})
}
// 获取业务对象及其字段(表的列名)
export function getModelFieldList(params) {
	return request({
		url: '/plm/field/modelField',
		method: 'get',
		headers: { repeatSubmit: false },
		params
	})
}
// 查询列表数据(公用,表的数据)
export function getSourceData(data) {
	return request({
		url: '/plm/color/list',
		method: 'post',
		headers: { repeatSubmit: false },
		data
	})
}
// 查询用户详情列表数据
export function getUserDetailData(data) {
	return request({
		url: `/plm/color/getById`,
		method: 'post',
		headers: { repeatSubmit: false },
		data
	})
}
// 获取枚举类列表
export function getEnumerationParentList(data) {
	return request({
		url: '/plm/enum/classify/list',
		method: 'post',
		headers: { repeatSubmit: false },
		data
	})
}
// 获取筛选项(下拉框)
export function getSelOptions(params) {
	return request({
		url: '/plm/color/getSelect',
		method: 'get',
		headers: { repeatSubmit: false },
		params
	})
}
// 内部视图获取数据(详情页)
export function getviewContent(params) {
	return request({
		url: '/plm/view/content',
		method: 'get',
		headers: { repeatSubmit: false },
		params
	})
}
// 获取枚举列表
export function getEnumerationSonList(data) {
	return request({
		url: '/plm/enum/data/list',
		method: 'post',
		headers: { repeatSubmit: false },
		data
	})
}
// 获取筛选项(列表的筛选)
export function getEnumSelOptions(data) {
	return request({
		url: '/plm/enum/classify/option',
		method: 'post',
		headers: { repeatSubmit: false },
		data
	})
}

// 新建枚举类
export function addEnumerationParentList(data) {
	return request({
		url: '/plm/enum/classify/add',
		method: 'post',
		headers: { repeatSubmit: false },
		data
	})
}

// 新建枚举值
export function addEnumerationSonList(data) {
	return request({
		url: '/plm/enum/data/add',
		method: 'post',
		headers: { repeatSubmit: false },
		data
	})
}

// 新建/修改信息
export function addInfo(data) {
	return request({
		url: '/plm/problem/addProblem',
		method: 'post',
		headers: { repeatSubmit: false },
		data
	})
}

//删除枚举类(暂弃)
export function delEnumerationParent(data) {
	return request({
		url: '/plm/enum/classify/delete',
		method: 'delete',
		headers: { repeatSubmit: false },
		data
	})
}

//修改枚举类
export function editEnumerationParent(data) {
	return request({
		url: '/plm/enum/classify/update',
		method: 'put',
		headers: { repeatSubmit: false },
		data
	})
}

//修改枚举类
export function editEnumerationSon(data) {
	return request({
		url: '/plm/enum/data/update',
		method: 'put',
		headers: { repeatSubmit: false },
		data
	})
}

// 上传图片数据
export function uploadBase(data) {
	return request({
		url: '/system/oss/uploadBase',
		method: 'post',
		headers: { repeatSubmit: false, 'Content-Type': 'multipart/form-data;' },
		data
	})
}

// 判重
export function checkValueAPI(params) {
	return request({
		url: '/plm/color/checkValue',
		method: 'get',
		params,
		headers: { repeatSubmit: false, 'Content-Type': 'multipart/form-data;' }
	})
}
